#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    cin >> s;
    if (s.size() == 4)
    {
        int year = std::stoi(s.substr(0, 2));
        if (year < 22) s = "20" + s;
        else s = "19" + s;
    }
    s.insert(4, "-");
    cout << s << endl;
    return 0;
}